﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Reflection;
using PSE.Framework.ProviderLoader.Configuration;

namespace PSE.AuditLogging.StorageService.Configuration
{
    public class InstanceConfigurationElement : ConfigurationElement
    {
        [ConfigurationProperty("instanceId", IsRequired = true)]
        public string InstanceId
        {
            get
            {
                return (string)this["instanceId"];
            }
            set
            {
                this["instanceId"] = value;
            }
        }

        [ConfigurationProperty("temporaryRepositoryProvider", IsRequired = true)]
        public ProviderConfigurationElement TemporaryRepositoryProvider
        {
            get
            {
                return (ProviderConfigurationElement)this["temporaryRepositoryProvider"];
            }
            set
            {
                this["temporaryRepositoryProvider"] = value;
            }
        }

        [ConfigurationProperty("temporaryRepositoryCheckInterval", IsRequired = true)]
        public int TemporaryRepositoryCheckInterval
        {
            get
            {
                return (int)this["temporaryRepositoryCheckInterval"];
            }
            set
            {
                this["temporaryRepositoryCheckInterval"] = value;
            }
        }

        [ConfigurationProperty("storages", IsRequired = true)]
        public StorageConfigurationElementCollection Storages
        {
            get
            {
                return (StorageConfigurationElementCollection)this["storages"];
            }
            set
            {
                this["storages"] = value;
            }
        }
    }
}
